﻿<Window x:Class="WpfViewBox.Window5"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       Title="Window3" Height="500" Width="640"    SnapsToDevicePixels="True">
    <StackPanel   Width="600">
        <StackPanel.Resources>
            <Style TargetType="{x:Type TextBlock}">
                <Setter Property="TextAlignment" Value="Center" />
            </Style>
        </StackPanel.Resources>
        <Grid Height="30"  Margin="0,20,0,0"  VerticalAlignment="Top" ShowGridLines="False" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <!--(600-30-380)=190-->
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="30"/>
            </Grid.ColumnDefinitions>
            <TextBlock Background="Aqua"  Text="A"  Width="380"  Grid.Column="0" />
        </Grid>
    </StackPanel>
</Window>
